package com.igoal.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.igoal.dao.CommentEntryDoneDAO;
import com.igoal.dao.UserDAOExt;
import com.igoal.dao.UserGoalEntryDoneDAO;
import com.igoal.dto.CommentEntryDoneDTO;
import com.igoal.entity.CommentEntryDone;
import com.igoal.entity.UserGoalDone;
import com.igoal.entity.factory.EntityFactory;

@Service("commentEntryDoneService")
public class CommentEntryDoneServiceImpl extends
		BaseCommentEntryService<UserGoalDone, CommentEntryDone, CommentEntryDoneDTO>
		implements CommentEntryService<UserGoalDone, CommentEntryDone, CommentEntryDoneDTO> {

	@Autowired
	public void setCommentEntryDoneDAO(CommentEntryDoneDAO commentEntryDoneDAO) {
		this.commentDAO = commentEntryDoneDAO;
	}
	
	@Autowired
	public void setActionLoggerService(ActionLoggerService actionLoggerService) {
		this.actionLoggerService = actionLoggerService;
	}
	
	@Autowired
	public void setUserGoalEntryDoneDAO(UserGoalEntryDoneDAO entryDAO){
		this.entryDAO = entryDAO;
	}
	
	@Autowired	
	public void setUserDAO(UserDAOExt userDAO) {
		this.userDAO = userDAO;		
	}
	
	@Override
	public CommentEntryDoneDTO initDTO() {
		CommentEntryDoneDTO dto = new CommentEntryDoneDTO();
		return dto;
	}

	@Override
	public CommentEntryDone initEntity() {
		CommentEntryDone comment = new CommentEntryDone();
		EntityFactory.setAuditInformation(comment);
		return comment;
	}

}
